import { Form, Input } from 'antd';
import React from 'react';

import { FormFieldBase } from '../../../typings/FormFieldBase';

export type InputFormFieldProps = FormFieldBase & {};
export const InputFormField: React.FC<InputFormFieldProps> = (props) => {
  const { name, label, rules, placeholder, light } = props;

  return (
    <Form.Item label={ light ? undefined : label} name={name} rules={rules}>
      <Input placeholder={placeholder}/>
    </Form.Item>
  )
}
